<template>
  <div class="borrow">
    <div class="header" >
      <div style="margin:0 auto"></div>
      <div v-if="ifLogin" style="line-height:50px;margin:0 40px 0 0" >
          <span style="color:white"> {{$store.state.Mail}}</span><span>&nbsp;&nbsp;</span>
          <span @click="logout" style="cursor: pointer">退出登录</span></div>

      <div v-else style="line-height:50px;margin:0 40px 0 0;cursor: pointer" @click="goToCreate">
          <i class="el-icon-user-solid"/> 登录</div>
    </div>
    <el-dialog
        :visible.sync="dialogVisible"
        modal
        style="margin-top:-100px;margin-bottom: -10px;"
    >
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {

  },
  methods: {
    logout(){
      this.$router.push('/login')
    },
    goToCreate(){
      this.$router.push('/login')
    }
  },
};
</script>
<style scoped>
.header{
  height: 50px;
  display: flex;
  color:aqua;
}
</style>
